package com.ipet.app.adapter.ViewHolder;

import android.support.annotation.LayoutRes;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.ipet.app.R;
import com.ipet.app.bean.ReplyInfo;
import com.jude.easyrecyclerview.adapter.BaseViewHolder;

/**
 * Created by jindongping on 16/3/26.
 */
public class ReplyViewHolder extends BaseViewHolder<ReplyInfo> {
    ImageView imageView;
    TextView name, time, content;

    public ReplyViewHolder(ViewGroup parent, @LayoutRes int res) {
        super(parent, res);
        imageView = $(R.id.imageView);
        name = $(R.id.post_name);
        time = $(R.id.post_time);
        content = $(R.id.post_content);
    }

    @Override
    public void setData(ReplyInfo data) {
        super.setData(data);
        name.setText(data.getNickname());
        time.setText(data.getCreate_time());
        content.setText(data.getContent());

    }
}
